<script>
	import { useSystemInfoStore } from '@/stores/systemInfo'
	import { testLogin } from '@/api/user.js'
	export default {
		onLaunch: function() {
			console.log('App Launch')
			const {statusBarHeight} = useSystemInfoStore()
			uni.getSystemInfo({
				success: function (res) {
					statusBarHeight(res.statusBarHeight)
				}
			});
			//测试登录
			// testLogin({id:3}).then(res => {
			// 	console.log('登录结果',res)
			// 	uni.showToast({
			// 		title: '测试登录成功',
			// 		duration: 1500
			// 	});
			// })

			// #ifdef APP-PLUS
			//监听点击中间按钮
			uni.onTabBarMidButtonTap(() => {
				uni.navigateTo({
					url: '/pages/publish/index'
				});
			})
			// #endif
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
  page {
    /* touch-action: pan-y; */
		width: 100vw;
    min-height: 100vh;
  }
  /* .container {
		height: 100vh;
		height: 100vh;
		padding: 0;
		margin: 0;
		background-color: white;
  } */
</style>
